
import request from './request.js'

// 查看设备详情
export const reqGetDeviceDetail = (id) => {
  return request({
    method: 'GET',
    url: `/cinorecycle/test-device-phone/phone/${id}`
  })
}
// 读取后修改
export const reqUpdateDevice = (data) => {
  return request({
    method: 'PUT',
    url: '/cinorecycle/test-device-phone/phone',
    data
  })
}
// 提交修改 有锁无锁
export const reqSubmit = (data) => {
  return request({
    method: 'POST',
    url: '/cinorecycle/test-device-phone/phone',
    data
  })
}

// 获取型号
export const reqGetType = (typeId, brand) => {
  return request({
    method: 'GET',
    url: `/cinorecycle/model/by_human/select_brand_or_model_by_type/${typeId}/${brand}`
  })
}

// 获取品牌
export const reqGetBrand = (typeId) => {
  return request({
    method: 'GET',
    url: `/cinorecycle/model/by_human/select_brand_or_model_by_type/${typeId}`
  })
}

// 获取备注
export const reqGetMark = (typeId) => {
  return request({
    method: 'GET',
    url: `/cinorecycle/test-device-mark/marks/${typeId}`
  })
}

// 打印
export const reqPcPrint = (deviceId, userId) => {
  return request({
    method: 'GET',
    url: `/cinorecycle/all-in-one/print-qr/${deviceId}/${userId}`
  })
}
